package com.wxs.common.service;

import java.util.List;

import com.wxs.common.pojo.Role;
import com.wxs.common.utils.DataGridModel;
import com.wxs.common.utils.DataResult;

/**
 * 角色
 * 
 * @author admin
 *
 */
public interface RoleService {
	public List<Role> queryForList(Integer roleGroupId);

	public DataResult queryPage(String name, Boolean enabled, DataGridModel dgm);

	/**
	 * 根据状态获取
	 * 
	 * @return
	 */
	public List<Role> findAllByEnabled(Boolean enabled);

	public Role findById(Integer id);

	public int editRole(Role role);

	public int saveRole(Role role);

	public boolean checkName(String name, Integer id);

	public int deleteById(Integer id);

	public int saveRoleResource(String[] resourceids, Integer roleid);
}
